% This script generates Figure 4 in the manuscript. The figure plots the
% number of work stoppages in the data, the Rust Belt (model) and the
% Rest-of-the-Country (model).
%% Load data and results from benchmark parameterization.
clearvars
cd ..
cd ./quantitative_model
load('solution_model_BM.mat');
cd ..
cd ./replicate_figures
year = 1947:1:2000;
strike_data = table2array(readtable('work_stoppages.xlsx','Range','N9:N62'));
% Convert arrays with strike data into column vectors:
strike_rate_SB_t = strike_rate_SB_t(:);
strike_rate_RB_t = strike_rate_RB_t(:);
% Normalize strike rates by 1950-80 average:
strike_rate_SB_t_index = strike_rate_SB_t./mean(strike_rate_RB_t(1:31))*100;
strike_rate_RB_t_index = strike_rate_RB_t./mean(strike_rate_RB_t(1:31))*100;
strike_data_index = strike_data./mean(strike_data(1:34))*100;
%% Figure 4: Work Stoppages in Model and Data
figure(4)
% Model: Rest-of-Country
plot(year(4:end),strike_rate_SB_t_index,'--','LineWidth',2,'Color','k')
text(1961, 23,'Rest-of-Country, model','Color','k','FontSize',13)
xlim([1946 2001])
ylim([-1 161])
hold on
% Model: Rust Belt
plot(year(4:end),strike_rate_RB_t_index,':','LineWidth',2,'Color','k')
text(1980, 101,'Rust Belt, model','Color','k','FontSize',13)
% Data
plot(year,strike_data_index,'k','LineWidth',2)
text(1954, 145,'Data','Color',zeros(1,3),'FontSize',13)
grid on
hold off
ylabel('Work Stoppages, Average for 1950-80 = 100','FontSize',14)
set(gca,'box','off','TickDir','out','FontSize',14);
%% Save Figure 4 in PDF and EPS file formats.
saveas(gcf,'fig4.pdf');
saveas(gcf,'fig4','epsc');